Skip to content

Colors: the scheme follows the Figma UI Kit, light and dark - #2879

Open
yasell wants to merge 1 commit into
CopilotKit:mainfrom
yasell:redesign/colors-figma
Open

yasell wants to merge 1 commit into
CopilotKit:mainfrom
yasell:redesign/colors-figma

Conversation

@yasell

@yasell yasell commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

The Figma UI Kit now has a dark theme: the Light and Dark modes of its Semantic variable
collection (2026-12-03). This pull request sets the scheme's colors to it in
tokens/src/scheme.ts, and bun run tokens:generate writes them into every copy: the web app,
OpenBot Desktop, OpenBot Mobile, the manifest and the artifacts' kit. No token is added, renamed or
removed, and no primitive or screen changes: every screen takes the new values from the tokens.

Each of the kit's hex values was converted to OKLCH and back through tokens/src/color.ts and
through Color.js, and both give the kit's hex exactly.

Light

Token main This pull request Kit
background #f8fafb #fafafa neutral/95
foreground, primary and every *-foreground on a light fill #010313 #0b121a neutral/10
secondary, accent #ecf1f6 #edf3fa neutral/90
muted #ecf1f6 #e7eaf0 neutral/85
muted-foreground #55667f #525960 neutral/30
ring, sidebar-ring #727eef #6f7fb9 lavender/50
sidebar #e9eef4 #e7eaf0 neutral/85
success #12795b #08684f success/20
border, input, sidebar-border #010313 at 10% #0b121a at 10% see Lines, below

card, popover and primary-foreground stay white; destructive (#a31526) and warning
(#a84900) are already the kit's.

Dark

Token main This pull request Kit
background #0d1319 #0b121a neutral/10
card, popover #131920 #111820 neutral/12
foreground, primary and every *-foreground on a dark fill #eef1f3 #edf3fa neutral/90
primary-foreground, sidebar-primary-foreground #020409 #0b121a neutral/10
secondary #1c232a #1d232a neutral/15
muted #1c232a #30363d neutral/20
accent #232a31 #30363d neutral/20
muted-foreground #949ca5 #9fa5ac neutral/60
ring, sidebar-ring #8d97ff #6f7fb9 lavender/50, as in light
sidebar #070d14 #030508 neutral/4
success #5fe3bb #45d3b0 success/60
warning #ffb900 #ff9e40 warning/65
destructive #ff9aa0 #fdafb6 destructive/80 #f6a8af, a shade lighter (see Contrast)
border, input, sidebar-border #eef1f3 at 12% #edf3fa at 12% see Lines, below

What changes in the levels

The levels keep their order in both modes, frame darker than panel, panel darker than card
(app/tests/design-tokens.test.ts), and in dark the fills stay lighter than the card. Two things
read differently:

  • In light, secondary and accent are one pale blue and muted is a step deeper, the sidebar's
    tint. On main all three were one color.
  • In dark, muted and accent are a step above secondary rather than equal to it, and the frame
    is close to black.

The grays stay one family (tokens/tests/slate.test.ts): in light every tinted gray sits between
hues 248 and 265 and the panel has no tint; in dark every gray sits at hue 252 with chroma 0.02 or
less.

Lines

The kit draws its lines opaque (#e7e7e8, #2b323a). The rule here is that every line is the
text color at one strength (app/tests/ui-look-theme.test.ts), so this pull request keeps that
rule and only moves the lines to the new text color: 1.23:1 against a card in light (1.25:1 on
main) and 1.38:1 in dark, as before. The opaque lines come with #2801, which
changes the rule. Whichever of the two lands second takes #2801's lines in scheme.ts and
regenerates.

Contrast

Every pair in tokens/tests/contrast.test.ts passes in light and in dark:

Pair Light, main Light, this PR Dark, main Dark, this PR
foreground on background 19.59 18.03 16.47 16.85
foreground on card 20.51 18.82 15.59 16.00
muted-foreground on background 5.58 6.80 6.72 7.58
muted-foreground on card 5.84 7.10 6.36 7.19
muted-foreground on muted 5.14 5.89 5.71 4.91
primary-foreground on primary 20.51 18.82 18.08 16.85
sidebar-foreground on sidebar 17.58 15.62 17.19 18.27
sidebar-accent-foreground on the selected row 15.77 14.13 13.89 15.25
destructive on card 7.80 7.80 8.74 10.20
success on card 5.37 6.77 11.11 9.53
warning on card 5.80 5.80 10.27 8.69
ring on background 3.37 3.72 7.12 4.85
ring on card 3.53 3.88 6.74 4.60
sidebar-ring on sidebar 3.03 3.22 7.43 5.26

The values were also run against #2801's version of that test, which adds badges and alerts on
their tints and the ring on a dialog and on a muted row: 155 of 155 pass. With the kit's own dark
destructive (#f6a8af) one of them fails: its words on a destructive/20 hover over a muted row
reach 4.29:1. The destructive here keeps the kit's hue and chroma, a shade lighter (OKLCH
lightness 0.809 to 0.829), and reaches 4.52:1.

One pairing fails that no test holds: in light, warning words on a warning/10 tint over
muted are 4.20:1 (4.44:1 on main: the warning is the same, the muted is deeper). The badge's
warning variant, the setup checklist and What if draw warning words on that tint; on the page and
on a card they read at 4.82:1 and 5.02:1. #2801 moves the badge's words to foreground.

Not in this pull request

  • The kit's sidebar-accent (lavender/70 at 30%), its empty-pattern-color, its six chart colors
    and its in-progress status (a new token) come separately.
  • The terminal keeps its own palette (terminal-theme.ts), tuned for its own dark ground.

Other changes

  • mobile/app.config.ts: the splash's background, written out by hand, follows the scheme
    (mobile/tests/launch-splash.test.ts holds them equal).
  • tokens/tests/generated.test.ts: the phone's dark warning, pinned there, is #ff9e40.
  • docs/app-guidelines.md: the paragraph on the grays.
  • app/tests/skins.test.ts: a comment that said secondary, muted and accent are one color in light.

What I looked at

A gallery built from the app's own primitives: the sidebar with a selected row, a row under the
pointer and a row with keyboard focus; a card with a focused field, a checkbox, switches and every
button variant; a menu with its highlighted row; the badges; rows with statuses; and every surface
with text, quieter text, statuses, the ring and a line. main beside this pull request, light and
dark, then this pull request under each skin. Hover and focus are forced through DevTools.

01-screen-light

01-screen-dark

02-levels-light

02-levels-dark

03-skins

Checks

  • bun test in tokens/ (68 tests).
  • In app/: design-tokens, ui-look-theme, skins, skins-opendots-a11y,
    artifact-theme-contrast, artifact-bridge-tokens, color-scheme (168 tests); in Chromium and
    WebKit, the skins' browser tests, checkbox-contrast and desktop-window-theme (124 pass, 1
    skipped: it only takes screenshots).
  • In mobile/: launch-splash (3 tests).
  • bun run typecheck in app/; biome lint and biome format on the changed files.

Sets the scheme's colors to the Light and Dark modes of the Figma UI Kit's
Semantic collection (2026-12-03) and writes them into every app's copy.
The lines stay the text color at 10% and 12%, now of the new text color;
the dark destructive is the kit's, a shade lighter, so its words read at
4.5:1 on a destructive/20 hover over a muted row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant